import {fromJS} from 'immutable'
import {RECEIVE_DETAIL_BY_ID} from '../../../store/actionTypes'
//使用immutable来防止state数据被改变，
const defaultState = fromJS({
    content:{}
});
export default (state = defaultState,action) =>{
    if(action.type === RECEIVE_DETAIL_BY_ID){
        //console.log(action);
        return state.set('content',action.data);
    }
    return state;
}